import RPi.GPIO as gpio
import time

gpio.setwarnings(False)
gpio.setmode(gpio.BOARD)
gpio.setup(12, gpio.OUT)
p = gpio.PWM(12, 50)

try:
  while True:
    dc = float(input('input dc 2.5-12.5:'))
    p.start(dc)
    time.sleep(0.24)
    #p.stop()
except KeyboardInterrupt:
  pass

p.stop()
gpio.cleanup()


